<?
switch (addslashes($_REQUEST['frame'])) {
    case "build":
        include ("module/include/build.php");
        break;
	case "addcartBuild":
        include ("module/addCartBuild.php");
        break;
    case "product_category":
        include ("module/product_category.php");
        break;
    case "product":
        //include ("module/product.php");
        include ("module/include/product-category.php");
        break;
    case "product_detail":
        include ("module/include/content_view_product.php");
        //include ("module/product_detail.php");
        break;
        //------------ Single page -------------------------------------------------------------------------------
    case "intro":
        include ("module/single.php");
        break;
    case "encourage":
        include ("module/single.php");
        break;
    case "service":
        include ("module/single.php");
        break;
    case "solution":
        include ("module/single.php");
        break;
    case "partner":
        include ("module/single.php");
        break;
    case "contact":
        include ("module/contact.php");
        break;
    case "friend":
        include ("module/friend.php");
        break;
        //------------ Multi page -------------------------------------------------------------------------------
    case "recruit_detail":
        include ("module/recruit_detail.php");
        break;
    case "news_detail":
        //include ("module/news_detail.php");
        include ("module/include/news_detail.php");
        break;
    //case "cart":
    //    include ("module/cart.php");
    //    break;
    case "finish":
        include ("module/finish.php");
        break;
    case "linkdemo":
        include ("module/linkdemo.php");
        break;
    case "checkout":
        include ("module/checkout.php");
        break;
    case "search":
        include ("module/search.php");
        break;
    case "register":
        if(isset($_SESSION['email']))
            include ("module/home.php");            
        else 
            include ("module/register.php");
        break;
    case "dn":
        if(isset($_SESSION['email']))
            include ("module/home.php");            
        else 
            include ("module/member_login.php");
        break;
    case "forgotpass":
        include ("module/member_forgotpass.php");
        break;
    case "download":
        if (!empty($_SESSION['member'])) {
            include ("module/download.php");
        } else {
            include ("module/member_login.php");
        }
        break;
    case "logout":
        unset($_SESSION['email']);
        echo "<script>window.location='./?frame=home'</script>";
        break;
    case "forum":
        echo "<script>window.location='forum'</script>";
        break;
    case "viewCart":
        include("module/view_cart.php");
        break;
    case "addCart":
        include("module/addCart.php");
        break;
    case "delCart":
        include("module/delCart.php");
        break;
    case "home":
        include ("module/home.php");
        break;
    case "confirmCart":
        include ("module/confim_cart.php");
        break;
    default:
        include ("module/home.php");
        break;
}
?>